package edu.uta.cfl.GUI;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.BoxLayout;
import java.awt.GridLayout;
import java.awt.CardLayout;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;

public class testWindow {

	private JFrame frame;
	private JTextField textField_IPM;
	private JTextField textFieldPath_rts;
	private JTextField textFieldFileName_rts;
	private JTextField textField_projectName;
	private JTextField textFieldPath_SC;
	private JTextField textFieldFileName_SC;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					testWindow window = new testWindow();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public testWindow() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(100, 100, 553, 382);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(
				new BoxLayout(frame.getContentPane(), BoxLayout.X_AXIS));

		JPanel panel = new JPanel();
		frame.getContentPane().add(panel);

		JLabel lblProjectName = new JLabel("Project Name:");

		JLabel lblinputName = new JLabel("IPM & Initial Test Set");

		textField_IPM = new JTextField();
		textField_IPM.setColumns(10);

		JButton btnOpen_inputFile = new JButton("Select Input File");

		JSeparator separator = new JSeparator();

		JSeparator separator_1 = new JSeparator();

		JLabel lblRecomTestSet = new JLabel("Recommended Test Set");

		textFieldPath_rts = new JTextField();
		textFieldPath_rts.setColumns(10);

		textFieldFileName_rts = new JTextField();
		textFieldFileName_rts.setColumns(10);

		textField_projectName = new JTextField();
		textField_projectName.setColumns(10);

		JLabel lblPath_rts = new JLabel("Path:");

		JLabel lblfileName_rts = new JLabel("File Name");

		JLabel lblSuspiciousCombinations = new JLabel("Suspicious Combinations");

		JLabel lblPath_SC = new JLabel("Path:");

		JLabel lblFileName_SC = new JLabel("File Name:");

		textFieldPath_SC = new JTextField();
		textFieldPath_SC.setColumns(10);

		textFieldFileName_SC = new JTextField();
		textFieldFileName_SC.setColumns(10);

		JButton btnPathBtn_rts = new JButton("Select Path");

		JButton btnPath_SC = new JButton("Select Path");
		GroupLayout gl_panel = new GroupLayout(panel);
		gl_panel.setHorizontalGroup(gl_panel
				.createParallelGroup(Alignment.LEADING)
				.addGroup(
						gl_panel.createSequentialGroup()
								.addGap(21)
								.addGroup(
										gl_panel.createParallelGroup(
												Alignment.LEADING)
												.addGroup(
														gl_panel.createSequentialGroup()
																.addComponent(
																		lblinputName)
																.addPreferredGap(
																		ComponentPlacement.RELATED,
																		260,
																		Short.MAX_VALUE)
																.addComponent(
																		btnOpen_inputFile,
																		GroupLayout.PREFERRED_SIZE,
																		111,
																		GroupLayout.PREFERRED_SIZE)
																.addGap(32))
												.addGroup(
														gl_panel.createSequentialGroup()
																.addComponent(
																		lblProjectName,
																		GroupLayout.PREFERRED_SIZE,
																		96,
																		GroupLayout.PREFERRED_SIZE)
																.addPreferredGap(
																		ComponentPlacement.RELATED)
																.addComponent(
																		textField_projectName,
																		GroupLayout.PREFERRED_SIZE,
																		GroupLayout.DEFAULT_SIZE,
																		GroupLayout.PREFERRED_SIZE)
																.addContainerGap())
												.addGroup(
														gl_panel.createSequentialGroup()
																.addGroup(
																		gl_panel.createParallelGroup(
																				Alignment.LEADING,
																				false)
																				.addGroup(
																						gl_panel.createSequentialGroup()
																								.addGroup(
																										gl_panel.createParallelGroup(
																												Alignment.LEADING)
																												.addComponent(
																														lblPath_rts)
																												.addGroup(
																														gl_panel.createSequentialGroup()
																																.addPreferredGap(
																																		ComponentPlacement.RELATED)
																																.addGroup(
																																		gl_panel.createParallelGroup(
																																				Alignment.LEADING)
																																				.addComponent(
																																						lblfileName_rts)
																																				.addComponent(
																																						separator,
																																						GroupLayout.PREFERRED_SIZE,
																																						1,
																																						GroupLayout.PREFERRED_SIZE)
																																				.addComponent(
																																						lblSuspiciousCombinations)
																																				.addComponent(
																																						lblPath_SC)
																																				.addComponent(
																																						lblFileName_SC))))
																								.addPreferredGap(
																										ComponentPlacement.RELATED,
																										43,
																										Short.MAX_VALUE)
																								.addGroup(
																										gl_panel.createParallelGroup(
																												Alignment.TRAILING)
																												.addComponent(
																														textFieldFileName_rts,
																														GroupLayout.PREFERRED_SIZE,
																														GroupLayout.DEFAULT_SIZE,
																														GroupLayout.PREFERRED_SIZE)
																												.addComponent(
																														textFieldPath_rts,
																														GroupLayout.PREFERRED_SIZE,
																														GroupLayout.DEFAULT_SIZE,
																														GroupLayout.PREFERRED_SIZE)
																												.addComponent(
																														textFieldPath_SC,
																														GroupLayout.PREFERRED_SIZE,
																														GroupLayout.DEFAULT_SIZE,
																														GroupLayout.PREFERRED_SIZE)
																												.addComponent(
																														textFieldFileName_SC,
																														GroupLayout.PREFERRED_SIZE,
																														GroupLayout.DEFAULT_SIZE,
																														GroupLayout.PREFERRED_SIZE))
																								.addPreferredGap(
																										ComponentPlacement.UNRELATED)
																								.addGroup(
																										gl_panel.createParallelGroup(
																												Alignment.LEADING)
																												.addComponent(
																														btnPathBtn_rts)
																												.addComponent(
																														btnPath_SC))
																								.addGap(29))
																				.addGroup(
																						gl_panel.createSequentialGroup()
																								.addComponent(
																										lblRecomTestSet,
																										GroupLayout.PREFERRED_SIZE,
																										169,
																										GroupLayout.PREFERRED_SIZE)
																								.addGap(29)
																								.addGroup(
																										gl_panel.createParallelGroup(
																												Alignment.LEADING)
																												.addComponent(
																														textField_IPM,
																														GroupLayout.PREFERRED_SIZE,
																														166,
																														GroupLayout.PREFERRED_SIZE)
																												.addComponent(
																														separator_1,
																														GroupLayout.PREFERRED_SIZE,
																														1,
																														GroupLayout.PREFERRED_SIZE))
																								.addGap(131)))
																.addContainerGap(
																		37,
																		Short.MAX_VALUE)))));
		gl_panel.setVerticalGroup(gl_panel
				.createParallelGroup(Alignment.LEADING)
				.addGroup(
						gl_panel.createSequentialGroup()
								.addGroup(
										gl_panel.createParallelGroup(
												Alignment.LEADING)
												.addGroup(
														gl_panel.createSequentialGroup()
																.addGap(17)
																.addGroup(
																		gl_panel.createParallelGroup(
																				Alignment.BASELINE)
																				.addComponent(
																						lblProjectName)
																				.addComponent(
																						textField_projectName,
																						GroupLayout.PREFERRED_SIZE,
																						GroupLayout.DEFAULT_SIZE,
																						GroupLayout.PREFERRED_SIZE))
																.addGap(18)
																.addGroup(
																		gl_panel.createParallelGroup(
																				Alignment.BASELINE)
																				.addComponent(
																						lblinputName)
																				.addComponent(
																						btnOpen_inputFile,
																						GroupLayout.PREFERRED_SIZE,
																						29,
																						GroupLayout.PREFERRED_SIZE)
																				.addComponent(
																						textField_IPM,
																						GroupLayout.DEFAULT_SIZE,
																						28,
																						Short.MAX_VALUE))
																.addGap(18)
																.addGroup(
																		gl_panel.createParallelGroup(
																				Alignment.LEADING)
																				.addComponent(
																						separator_1,
																						GroupLayout.PREFERRED_SIZE,
																						GroupLayout.DEFAULT_SIZE,
																						GroupLayout.PREFERRED_SIZE)
																				.addComponent(
																						lblRecomTestSet))
																.addGap(18)
																.addGroup(
																		gl_panel.createParallelGroup(
																				Alignment.LEADING)
																				.addComponent(
																						lblPath_rts)
																				.addGroup(
																						gl_panel.createParallelGroup(
																								Alignment.BASELINE)
																								.addComponent(
																										textFieldPath_rts,
																										GroupLayout.PREFERRED_SIZE,
																										GroupLayout.DEFAULT_SIZE,
																										GroupLayout.PREFERRED_SIZE)
																								.addComponent(
																										btnPathBtn_rts)))
																.addGap(4)
																.addGroup(
																		gl_panel.createParallelGroup(
																				Alignment.LEADING)
																				.addGroup(
																						gl_panel.createSequentialGroup()
																								.addGap(34)
																								.addComponent(
																										separator,
																										GroupLayout.PREFERRED_SIZE,
																										GroupLayout.DEFAULT_SIZE,
																										GroupLayout.PREFERRED_SIZE))
																				.addGroup(
																						gl_panel.createSequentialGroup()
																								.addPreferredGap(
																										ComponentPlacement.RELATED)
																								.addComponent(
																										textFieldFileName_rts,
																										GroupLayout.PREFERRED_SIZE,
																										GroupLayout.DEFAULT_SIZE,
																										GroupLayout.PREFERRED_SIZE))))
												.addGroup(
														gl_panel.createSequentialGroup()
																.addGap(185)
																.addComponent(
																		lblfileName_rts)))
								.addPreferredGap(ComponentPlacement.RELATED)
								.addGroup(
										gl_panel.createParallelGroup(
												Alignment.TRAILING)
												.addGroup(
														gl_panel.createSequentialGroup()
																.addComponent(
																		lblSuspiciousCombinations)
																.addGap(18)
																.addComponent(
																		lblPath_SC))
												.addGroup(
														gl_panel.createParallelGroup(
																Alignment.BASELINE)
																.addComponent(
																		textFieldPath_SC,
																		GroupLayout.PREFERRED_SIZE,
																		GroupLayout.DEFAULT_SIZE,
																		GroupLayout.PREFERRED_SIZE)
																.addComponent(
																		btnPath_SC)))
								.addPreferredGap(ComponentPlacement.UNRELATED)
								.addGroup(
										gl_panel.createParallelGroup(
												Alignment.BASELINE)
												.addComponent(lblFileName_SC)
												.addComponent(
														textFieldFileName_SC,
														GroupLayout.PREFERRED_SIZE,
														GroupLayout.DEFAULT_SIZE,
														GroupLayout.PREFERRED_SIZE))
								.addGap(39)));
		panel.setLayout(gl_panel);

	}
}
